/*
 * Copyright 2016 Wealth Inc. All rights reserved.
 */
 package com.wealth.commodity.service;

import java.util.List;
import java.util.Map;

import com.wealth.commodity.entity.Category;
import com.wealth.commodity.vo.CategoryVO;

import iaas.service.IBaseService;

/**
 * @author chan
 * @version 1.0
 * @since 1.0
 */
 
public interface ICategoryService extends IBaseService<Category>{
	
	/**  查询商品分类 企业+状态  */
	public 	List<Category> findByStatusAndCorpId(Integer status,Long corpId);
	
	/** 查询商品分类 企业+市场+状态 */
	public 	List<Category> findByCorpIdAndMarketIdAndStatus(Long corpId,Long marketId,Integer status);
	
	/** 查询商品分类 企业+市场+状态+父节点 */
	public 	List<Category> getCategoryByCorpIdAndMarketIdAndStatusAndParentIdIsNull(Long corpId,Long marketId,Integer status) throws Exception;
	/** 查询商品分类 企业+市场+状态+父节点 */
	public Category getCategoryByCorpIdAndMarketIdAndPcategoryIsNullAndStatusAndName(Long corpId,Long marketId,Integer status,String name) throws Exception;
	/** 查询商品分类 企业+市场+状态+父节点*/
	public Category findByCorpIdAndMarketIdAndStatusAndPcategoryIdAndName(Long cropId,Long marketId, Integer status, Long pcategoryId,String name) throws Exception;
	/** ---------------- 微信端 ---------------- */
	/** 惠生活 商品分类父子列表*/
	public List<CategoryVO> getCategoryForHuiLife(Long corpId,Long marketId,Integer status)  throws Exception;

	public List<Category> getByPcategoryIdAndStatus(Long pcategoryId, int value);
	
	public List<Category> getByMarketIdAndStatusAndPcategoryIsNull(Long mid,Integer status);

	public List<Category> findByStatusAndCorpIdAndMarketIdAndPcategoryIsNull(Integer value,Long corpid, Long marketId);

	public boolean unique(String mName,Integer status, Long pcategoryId, Long marketId)  throws Exception;

	
	/**
	 * PC端首页商品分类查询
	 * @param status
	 * @param corpId
	 * @return
	 */
	public List<CategoryVO> getCategoryByStatusAndCorpId(Integer status,Long corpId);
	
	
	
}
